Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

143
Vistas
(e) => getExchangeInput(e.target.value) have type any

how type need for getExchangeInput and getCurrency if get type React.FC give error in other component Type '(amountFirstInput: number) => void' is not assignable to type 'FC'. Types of parameters 'amountFirstInput' and 'props' are incompatible. Type 'string' is not assignable to type 'number'.

import { IExchangeRate } from 'types/IExchangeRate';

import './index.scss';

interface IInputParams {
  amount: number;
  currency: string;
  currencies: IExchangeRate[];
  getExchangeInput: any
  getCurrency: any;
}

const Input: React.FC<IInputParams> = ({amount, currency, currencies, getExchangeInput, getCurrency}) => {
  return (
      <div className='exchangeRates'>
        <input type="number" onChange={(e) => getExchangeInput(e.target.value)} value={amount}></input>
        <select value={currency} onChange={(e) => getCurrency(e.target.value)}>
          {currencies.map((element) => (
            <option key={element.r030} value={element.cc}>{element.cc}</option>
          ))}
        </select>
      </div>
  );
}

export default Input;
about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda